import bus from '@/bus'
let data = {
  status: 'pass',
  totalItem: 1,
  pageSize: window.$pageSize,
  currentPage: 1,
  form: {
    purchOrderSn: null,
    erpOrderSn: null,
    fxDistributorName: null,
    fxDistributorSn: null,
    fxSn: null,
    receiveAddress: null,
    superiorDistributorName: null,
    date: [],
    crDate: [],
    receiverContactName: null,
    deliveryCo: null,
    erpStockOutSn: null,
    receiverContactPhone: null,
    title: null,
    deliverySn: null,
    storeId: null,
    areaId: null,
    cityId: null,
    provinceId: null,
    distributorId: null,
    depId: null,
    officeId: null
  },
  columns: [{
    type: 'selection',
    width: 60,
    align: 'left',
    fixed: 'left'
  },{
    title: '单号(中策云)',
    key: 'purchOrderSn',
    align: 'left',
    minWidth: 250,
    fixed: 'left'
  }, {
    title: '单号(前鹏)',
    key: 'fxSn',
    align: 'left',
    minWidth: 180,
    fixed: 'left'
  }, {
    title: '创建时间',
    key: 'createDate',
    align: 'left',
    minWidth: 200
  }, {
    title: '直发费用(元)',
    key: 'deliveryFee',
    align: 'left',
    minWidth: 150,
    render: (h, params) => {
      return h('div',[
        // h('span',{ class: 'font-red' }, '￥'),
        h('InputNumber',{
          props: {
            min: 1,
            max: 9999999,
            value: params.row.deliveryFee
          },
          style: {
            width:'85%'
          },
          on: {
            'on-change': (value) => {
              bus.$emit('onChangeData', { val: value, params: params.row, index: params.index, type: 'deliveryFee' })
            },
            'on-blur': () => {
              bus.$emit('onBlurData', { params: params.row })
            }
          }
        })
      ])
    }
  }, {
    title: '快递公司',
    key: 'deliveryCo',
    align: 'left',
    minWidth: 150
  }, {
    title: '快递单号',
    key: 'deliverySn',
    align: 'left',
    minWidth: 200
  }, {
    title: '门店名称',
    key: 'storeName',
    align: 'left',
    minWidth: 200,
    tooltip: true
  }, {
    title: '门店联系人',
    key: 'storeContact',
    align: 'left',
    minWidth: 150
  }, {
    title: '门店电话',
    key: 'storeContactPhone',
    align: 'left',
    minWidth: 150
  }, {
    title: '收货地址',
    key: 'receiveAddress',
    align: 'left',
    minWidth: 200,
    tooltip: true
  }, {
    title: '收货人',
    key: 'receiverContactName',
    align: 'left',
    minWidth: 150
  }, {
    title: '收货电话',
    key: 'receiverContactPhone',
    align: 'left',
    minWidth: 150
  }, {
    title: '科室',
    key: 'parentDeptName',
    align: 'left',
    minWidth: 150
  }, {
    title: '部门',
    key: 'deptName',
    align: 'left',
    minWidth: 150
  }, {
    title: '上级经销商',
    key: 'superiorDistributorName',
    align: 'left',
    minWidth: 200
  }, {
    title: '经销商(前鹏)',
    key: 'fxDistributorName',
    align: 'left',
    minWidth: 200,
    tooltip: true
  }, {
    renderHeader: (h, p) => {
      let inner = h('div', [
        h('span', '编号(前鹏)'),
        h('Icon', {
          props: {
            type: 'ios-help-circle',
            size: 18
          }
        })
      ])
      return h('Tooltip', {
        props: {
          content: '经销商在前鹏分销系统的单号编号', 
          placement: 'top',
          transfer: true
        }
      }, [inner])
    },
    key: 'fxDistributorSn',
    align: 'left',
    minWidth: 200
  }, {
    title: '商品',
    key: 'title',
    align: 'left',
    minWidth: 300,
    render: (h, params) => {
      return h('ul', params.row.items.map(item => {
        return h('li', item.title)
      }))
    }
  }, {
    title: '单价(元)',
    key: 'price',
    align: 'right',
    minWidth: 100,
    render: (h, params) => {
      return h('ul', params.row.items.map(item => {
        return h('li', item.price)
      }))
    }
  }, {
    title: '数量',
    key: 'quantity',
    align: 'right',
    minWidth: 100,
    render: (h, params) => {
      return h('ul', params.row.items.map(item => {
        return h('li', item.quantity)
      }))
    }
  }, {
    title: '总价(元)',
    key: 'distributor',
    align: 'right',
    minWidth: 100,
    render: (h, params) => {
      return h('ul', params.row.items.map(item => {
        return h('li', item.price * item.quantity)
      }))
    }
  }, {
    title: '工厂出库',
    key: 'supplierStockoutDate',
    align: 'left',
    minWidth: 200
  }, {
    title: '销售订单(ERP)',
    key: 'erpOrderSn',
    align: 'left',
    minWidth: 200
  }, {
    title: '出库单(ERP)',
    key: 'erpStockOutSn',
    align: 'left',
    minWidth: 200
  }],
  data: []
}
export default data